<?php

class ActivityInviteInfoAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     *
     * @param $userId {int} 玩家ID
     * @param $activityId {int}
     * @param $reqTime {int}
     * @return SzResponse
     */
    public function execute($userId, $activityId, $reqTime)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_ACTIVITY_INVITE)) {
            return $this->buildResponse(false);
        }
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);
        $data = ActivityService::get()->getInviteInfo($userId, $activityId, $reqTime);
        return $this->buildResponse(array(
                'list' => $data['list'],
            ));
    }
}